Try at all costs is an adverbial phrase so it means putting all the effort, all the forces and procedures within the reach of anyone, including foreign aid to an end.